<?php

include_once 'Expression.php';
include_once 'Statement.php';

/**
 * The base class for SwitchStatement and IfElseStatement
 * 
 * @package UC_PHPCodeModel
 * @author Uros Calakovic 
 */

abstract class ConditionStatement extends Statement
{
    public function __construct()
    {
        parent::__construct();
    }
    
    public function __set($name, $value)
    {
        parent::__set($name, $value);
        
        if($name == 'Condition')
        {
            $this->set_Condition($value);
        }        
    }
    
    public function __get($name)
    {
        $ret = parent::__get($name);
        
        if($ret != null)
        {
            return $ret;
        }
        
        if($name == 'Condition')
        {
            return $this->get_Condition();
        }
    }
    
    /**
     * The $Condition getter method
     * @return Expression 
     */
    
    public function get_Condition()
    {
        return $this->Condition;
    }

    /**
     * The $Condition setter method
     * @param Expression $Condition 
     */
    
    public function set_Condition(Expression $Condition)
    {
        $this->Condition = $Condition;
    }    
    
    /**
     * The expression to evaluate
     * @var Expression 
     */
    
    private $Condition;
}

?>
